import Children from "./components/Children";
import { useState } from "react";

function HomeTwo() {
  const [list, setList] = useState<Array<string>>(["蜘蛛侠", "奥特曼"]);
  const orderCount = 111;
  const title = "这是Childern组件";

  const addList = () => {
    const arr = [...list, "sb"];
    setList(arr);
  };

  const getChildInfo = (val) => {
    console.log("🚀 ~ getChildInfo ~ val:", val);
  };

  return (
    <>
      <div>
        <div>HomeTwo</div>
        <Children
          title={title}
          list={list}
          myCount={orderCount}
          addFunc={addList}
          getInfo={getChildInfo}
        />
      </div>
    </>
  );
}

export default HomeTwo;
